window: Allow setting type hint on mapped windows
authorBenjamin Otte <otte@redhat.com>
Sun, 19 Jul 2015 02:37:47 +0000 (04:37 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 19 Jul 2015 02:45:25 +0000 (04:45 +0200)
gtk/gtkwindow.c

index 6889455322cdf6979ee390c444888443f6ab8b85..9bb1f90c8977ba55def0b2a6e2a642e6c6dacc12 100644 (file)
@@ -3503,13 +3503,15 @@ gtk_window_set_type_hint (GtkWindow           *window,
   GtkWindowPrivate *priv;
 
   g_return_if_fail (GTK_IS_WINDOW (window));
-  g_return_if_fail (!gtk_widget_get_mapped (GTK_WIDGET (window)));
 
   priv = window->priv;
 
   priv->type_hint = hint;
 
-  priv->reset_type_hint = TRUE;
+  if (gtk_widget_get_mapped (GTK_WIDGET (window)))
+    gdk_window_set_type_hint (gtk_widget_get_window (GTK_WIDGET (window)), hint);
+  else
+    priv->reset_type_hint = TRUE;
 
   update_window_buttons (window);
 }